const mongoose = require("mongoose");

// 解决警告
mongoose.set("strictQuery", true);

mongoose.connect("mongodb://localhost:27017");

mongoose.connection.once("open", (err) => {
  if (err) console.log(err);
  else console.log("数据库连接成功");
});
